#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonCryptor.h>


enum {
	ccOptionPKCS7Padding	= 0x0001,
	ccOptionECBMode		= 0x0002
};
typedef uint32_t CCOptions;

@interface NSData (CryptorAdditions)
- (NSData *)DESEncryptWithKeyString:(NSString*)keyString ccOptions:(CCOptions)ccOptions;
- (NSData *)DESDecryptWithKeyString:(NSString*)keyString ccOptions:(CCOptions)ccOptions;


- (NSData *)DESEncryptWithKeyData:(NSData*)keyData ccOptions:(CCOptions)ccOptions;
- (NSData *)DESDecryptWithKeyData:(NSData*)keyData ccOptions:(CCOptions)ccOptions;


- (NSData *)AESEncryptWithKeyString:(NSString*)keyString ccOptions:(CCOptions)ccOptions;
- (NSData *)AESDecryptWithKeyString:(NSString*)keyString ccOptions:(CCOptions)ccOptions;


- (NSData *)AESEncryptWithKeyData:(NSData*)keyData ccOptions:(CCOptions)ccOptions;
- (NSData *)AESDecryptWithKeyData:(NSData*)keyData ccOptions:(CCOptions)ccOptions;

- (NSData *)AES256EncryptWithKeyData:(NSString *)key;
- (NSData *)AES256DecryptWithKeyData:(NSString *)key;
@end

